/**
 * 自定义hooks，这里可以调用生命周期
 */
import {computed, onMounted, ref} from "vue";

export default () => {

    let a = ref(0)

    let bigA = computed(() => a.value * 1000)

    function add() {
        a.value += 1
    }

    onMounted(() => {
        console.log("挂载之后")
    })
    return {
        a, add, bigA
    }
}